Frames No Frames Cognitoware API v2009512
Cognitoware.Robotics.dll
Cognitoware.Mathematics.Probability.Discrete

Class MarkovChain<X>
X: The type of the Markov states.

System.Object


Summary

A Markov Chain is a conditional probability distribution that provides the probability of transitioning from a start x to an end x. This class has the "Markov Property", which means the prediction about the next x only depends on the current x and no other states before it. States that have this property are called "Markov States". The Markov chain can be represented as the conditional probability P(Xt+1 | Xt).

Constructor Summary

MarkovChain()

Method Summary

BayesianInference(X, RandomDistribution<X>)
Inherited from Cognitoware.Mathematics.Probability.RandomConditional
ConditionalProbabilityOf(X, X)
Calculates the probability of transition to the specified end x from the specified start x.
ConditionBy(X)
Creates a probability distribution of end states conditioned on a specific start x.
DoTransition(X, Double)
Transitions the start x to the end x using a random value.
Equals(Object)
Inherited from System.Object
Finalize()
Inherited from System.Object
GetHashCode()
Inherited from System.Object
GetType()
Inherited from System.Object
LikelihoodOf(X)
Returns the likelihood function of the x previous to end.
Marginalize(DiscreteConditional<X>)
Inherited from Cognitoware.Mathematics.Probability.Discrete.DiscreteConditional
Marginalize(RandomDistribution<X>)
Finds a distribution of ending states from a distribution of starting states.
MemberwiseClone()
Inherited from System.Object
Reverse()
Reverses the Markov chain so that it gives the probability of starting at a x given a destination x.
Set(X, X, Double)
Sets the probability of transitioning from a start x to an end x.
ToString()
Inherited from System.Object

Constructor Details

public MarkovChain()

Method Details

public override Double ConditionalProbabilityOf(X end, X start)
Calculates the probability of transition to the specified end x from the specified start x.

Parameters:

end - The end x.
start - The start x.

Returns:

The proability of transition from start to end.

public override RandomDistribution<X> ConditionBy(X start)
Creates a probability distribution of end states conditioned on a specific start x. A new distribution value map is creating by collecting all end states that are mapped to the start x. If the start x is undefined, then an exception is thrown.

Parameters:

start - The start x over which the conditional distribution.

Returns:

The probability distribution of the end x given the specific start x.

public X DoTransition(X start, Double select)
Transitions the start x to the end x using a random value. The random value must be between zero and one. If there are no transitions from the start x, then the start x is returned.

Parameters:

start - The starting x.
select - A random value between zero and one.

Returns:

The end x that maps to the start x and a random value.

public override RandomDistribution<X> LikelihoodOf(X end)
Returns the likelihood function of the x previous to end. Each value in the function maps a starting x to the probability of arriving at end from that x.

Parameters:

end - An ending x.

Returns:

The likelihood of arriving at end from all possible states.

public override RandomDistribution<X> Marginalize(RandomDistribution<X> start)
Finds a distribution of ending states from a distribution of starting states. Each value of P(end) is the weighted sum of P(end, start)*P(start)

Parameters:

start - A distribution across starting states.

Returns:

The expectation of ending states given the probable starting states.

public MarkovChain<X> Reverse()
Reverses the Markov chain so that it gives the probability of starting at a x given a destination x. Note that all of the start and end labels will be reversed.

Returns:

A MarkovChain that swaps the start and end states of this MarkovChain.

public void Set(X end, X start, Double p)
Sets the probability of transitioning from a start x to an end x.

Parameters:

end - An ending x.
start - A starting x.


Questions, Comments and Licensing
Copyright 2009 Cognitoware. All rights reserved.